if exists(select name from sysobjects where name = 'sp_GroupNewsGetAllByParentId')
	drop proc sp_GroupNewsGetAllByParentId
go
/*-- =============================================
	Created by: HP
	Created on: 2014-03-24 (dd/mm/yyyy)
	Description: 
	--

	File:$sql-scripts/Proc.sp_GroupNewsGetAllByParentId.sql
*/-- =============================================

CREATE PROCEDURE sp_GroupNewsGetAllByParentId
@ParentId int
AS
BEGIN
	SELECT
		a.[Id],
		a.[Name],
		a.[Tag],
		a.[Title],
		a.[Description],
		a.[Keyword],
		a.[Ord],
		a.[Priority],
		a.[Index],
		a.[Active],
		a.[Lang],
		a.[ParentId],
		a.url
	FROM
        GroupNews a WHERE a.Active<>255 and ParentId=@ParentId order by a.[index]
END
GO
